package com.dc.chat.controller;

import com.dc.chat.app.biz.CommonMessageBiz;
import com.dc.chat.entity.dao.CommonMessage;
import com.dc.chat.entity.to.ResponseBean;
import com.dc.chat.interceptor.security.Security;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/common-message")
public class CommonMessageController {
    @Resource
    CommonMessageBiz commonMessageBiz;
    @Security
    @PostMapping("/get-common-message")
    public ResponseBean<List<CommonMessage>> getCommonMessage(){
        return commonMessageBiz.getCommonMessage();
    }
}
